#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;
void dfs(int n, char a, char b, char c)
{
	if (n == 1)
	{
		cout << a << "->" << n << "->" << b << endl;
		return;
	}
	dfs(n - 1, a, c, b);
	cout << a << "->" << n << "->" << b << endl;
	dfs(n - 1, b, a, c);
}
int main()
{
	int n;
	cin >> n;
	dfs(n, 'a', 'b', 'c');
	return 0;
}

